<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>basic_signal_set::basic_signal_set (6 of 8 overloads)</title>
    <link rel="stylesheet" href="../../../../boostbook.css" type="text/css">
    <meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
    <link rel="home" href="../../../../index.html" title="Asio">
    <link rel="up" href="../basic_signal_set.html" title="basic_signal_set::basic_signal_set">
    <link rel="prev" href="overload5.html" title="basic_signal_set::basic_signal_set (5 of 8 overloads)">
    <link rel="next" href="overload7.html" title="basic_signal_set::basic_signal_set (7 of 8 overloads)">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%">
    <tr>
        <td valign="top"><img alt="asio C++ library" width="250" height="60" src="../../../../asio.png"></td>
    </tr>
</table>
<hr>
<div class="spirit-nav">
    <a accesskey="p" href="overload5.html"><img src="../../../../prev.png" alt="Prev"></a><a accesskey="u"
                                                                                             href="../basic_signal_set.html"><img
        src="../../../../up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img
        src="../../../../home.png" alt="Home"></a><a accesskey="n" href="overload7.html"><img src="../../../../next.png"
                                                                                              alt="Next"></a>
</div>
<div class="section">
    <div class="titlepage">
        <div>
            <div><h5 class="title">
                <a name="asio.reference.basic_signal_set.basic_signal_set.overload6"></a><a class="link"
                                                                                            href="overload6.html"
                                                                                            title="basic_signal_set::basic_signal_set (6 of 8 overloads)">basic_signal_set::basic_signal_set
                (6 of 8 overloads)</a>
            </h5></div>
        </div>
    </div>
    <p>
        Construct a signal set and add two signals.
    </p>
    <pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span>
    <span class="keyword">typename</span> <span class="identifier">ExecutionContext</span><span
                class="special">&gt;</span>
<span class="identifier">basic_signal_set</span><span class="special">(</span>
    <span class="identifier">ExecutionContext</span> <span class="special">&amp;</span> <span
                class="identifier">context</span><span class="special">,</span>
    <span class="keyword">int</span> <span class="identifier">signal_number_1</span><span class="special">,</span>
    <span class="keyword">int</span> <span class="identifier">signal_number_2</span><span class="special">,</span>
    <span class="keyword">typename</span> <span class="identifier">constraint</span><span
                class="special">&lt;</span> <span class="identifier">is_convertible</span><span
                class="special">&lt;</span> <span class="identifier">ExecutionContext</span> <span class="special">&amp;,</span> <span
                class="identifier">execution_context</span> <span class="special">&amp;</span> <span class="special">&gt;::</span><span
                class="identifier">value</span><span class="special">,</span> <span class="identifier">defaulted_constraint</span> <span
                class="special">&gt;::</span><span class="identifier">type</span>  <span class="special">=</span> <span
                class="identifier">defaulted_constraint</span><span class="special">());</span>
</pre>
    <p>
        This constructor creates a signal set and registers for two signals.
    </p>
    <h6>
        <a name="asio.reference.basic_signal_set.basic_signal_set.overload6.h0"></a>
        <span><a name="asio.reference.basic_signal_set.basic_signal_set.overload6.parameters"></a></span><a class="link"
                                                                                                            href="overload6.html#asio.reference.basic_signal_set.basic_signal_set.overload6.parameters">Parameters</a>
    </h6>
    <div class="variablelist">
        <p class="title"><b></b></p>
        <dl>
            <dt><span class="term">context</span></dt>
            <dd><p>
                An execution context which provides the I/O executor that the signal
                set will use, by default, to dispatch handlers for any asynchronous
                operations performed on the signal set.
            </p></dd>
            <dt><span class="term">signal_number_1</span></dt>
            <dd><p>
                The first signal number to be added.
            </p></dd>
            <dt><span class="term">signal_number_2</span></dt>
            <dd><p>
                The second signal number to be added.
            </p></dd>
        </dl>
    </div>
    <h6>
        <a name="asio.reference.basic_signal_set.basic_signal_set.overload6.h1"></a>
        <span><a name="asio.reference.basic_signal_set.basic_signal_set.overload6.remarks"></a></span><a class="link"
                                                                                                         href="overload6.html#asio.reference.basic_signal_set.basic_signal_set.overload6.remarks">Remarks</a>
    </h6>
    <p>
        This constructor is equivalent to performing:
    </p>
    <pre class="programlisting"><span class="identifier">asio</span><span class="special">::</span><span
            class="identifier">signal_set</span> <span class="identifier">signals</span><span
            class="special">(</span><span class="identifier">context</span><span class="special">);</span>
<span class="identifier">signals</span><span class="special">.</span><span class="identifier">add</span><span
                class="special">(</span><span class="identifier">signal_number_1</span><span class="special">);</span>
<span class="identifier">signals</span><span class="special">.</span><span class="identifier">add</span><span
                class="special">(</span><span class="identifier">signal_number_2</span><span class="special">);</span>
</pre>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%">
    <tr>
        <td align="left"></td>
        <td align="right">
            <div class="copyright-footer">Copyright © 2003-2022 Christopher M. Kohlhoff<p>
                Distributed under the Boost Software License, Version 1.0. (See accompanying
                file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
            </p>
            </div>
        </td>
    </tr>
</table>
<hr>
<div class="spirit-nav">
    <a accesskey="p" href="overload5.html"><img src="../../../../prev.png" alt="Prev"></a><a accesskey="u"
                                                                                             href="../basic_signal_set.html"><img
        src="../../../../up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img
        src="../../../../home.png" alt="Home"></a><a accesskey="n" href="overload7.html"><img src="../../../../next.png"
                                                                                              alt="Next"></a>
</div>
</body>
</html>
